Skip to content

Add support for Scala 2.13 #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

helfper
Copy link
Contributor

@helfper helfper commented Oct 12, 2020

This fix may look a bit "hacky" because it uses reflection to be able to set the correct sourceEncoding (BTW it seems there's no test covering that), but it may be worth it in the short-term until we see some movement in scalac-scoverage-plugin, as it has been almost one year without any releases there, and Scala 2.13 came out well over a year now.

This is the only solution I think of that can work with the current scalac-scoverage-plugin without requiring cross-building on gradle-scoverage side. The other constructors in ScoverageHtmlWriter use scala.Seq which is effectively a different type in Scala 2.12 and 2.13, so only cross-building could get over it.

Fixes #106

@eyalroth
Copy link
Contributor

There is an ignored test for Scala 2.13 added in eyalroth@69bb994. You could re-enable it and test your fix with it :)

Also, IIRC, there was a problem with selecting source encoding in the scalac plugin itself. See #68 (comment)

@helfper
Copy link
Contributor Author

helfper commented Oct 15, 2020

You can see in "Files changed" that I had already removed the @Ignore. I just forgot to remove the comment. And the tests passed in Travis CI.

I did come across that issue and #70, but I didn't find yet a test that would break if the source encoding part is removed. I didn't try too hard though. As is, at the moment, if I don't set the sourceEncoding, the tests still pass.

@helfper helfper closed this Jun 8, 2021
@helfper helfper deleted the scala213-support branch June 8, 2021 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does not work with 2.13
2 participants